﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business.IManager;
using Business.Manager;
using Entity;
using Utility;
using System.Security.Policy;
namespace OnlinePayment.Master
{
    public partial class MasterPage : System.Web.UI.MasterPage
    {
        public Student stu = null;
        public string path;
        public string parent;
        protected void Page_Load(object sender, EventArgs e)
        {
            /*parent = Master.MasterPageFile.ToString();
            

            string curPath = "/OP/";
            path = Request.Url.AbsolutePath;
            if (path.Equals(curPath + "Index.aspx"))
            {
                li_index.Attributes.Add("class", "current");
            }
            else if (path.Equals(curPath + "PaymentPlatform.aspx"))
            {
                li_paymentplatform.Attributes.Add("class", "current");
            }*/



            if (!IsPostBack)
            {
                if (Session["User"] == null)
                {
                    Response.Redirect("~/Default.aspx");
                }
                else
                {
                    stu = (Student)Session["User"];
                    lblStudentId.Text = stu.StudentId;
                }
            }
        }

        protected void lb_exit_Click(object sender, EventArgs e)
        {
            //Session.Clear();
            //Session.RemoveAll();
            Session["User"] = null;//string.Empty;

            Response.Redirect("../Default.aspx");
        }
    }
}